package com.huatai.user.vo;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @program: ht-system
 * @description: 资源权限表
 * @author: songxiude
 * @create: 2023-02-09 15:42
 **/
@ApiModel(value = "资源权限实体",description = "资源权限实体")
@Data
@NoArgsConstructor
public class PermissionVo {

	@ApiModelProperty("资源主键id")
	private Long id;

	@ApiModelProperty("资源名称（菜单、接口）")
	private String permissionName;

	@ApiModelProperty("父级id")
	private Long parentId;

	@ApiModelProperty("父级名称")
	private String pname;

	@ApiModelProperty("排序")
	private Integer sort;

	@ApiModelProperty("路由路径（菜单、接口、按钮）")
	private String rutePath;

	@ApiModelProperty("前端文件路径")
	private String component;

	@ApiModelProperty("资源类型（1菜单2接口3按钮）")
	private Integer permissionType;

	@ApiModelProperty("是否显示0显示1隐藏")
	private Integer isShow;

	@ApiModelProperty("是否设置为首页0否1是")
	private Integer isHomepage;

	@ApiModelProperty("权限标识key如：USER_DEL")
	private String permissionKey;

	@ApiModelProperty("前端菜单图标")
	private String icon;

	@ApiModelProperty("创建人id")
	private Long createUserid;

	@ApiModelProperty("创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private LocalDateTime createTime;

	@ApiModelProperty("更新人id")
	private Long updateUserid;

	@ApiModelProperty("更新时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
	private LocalDateTime updateTime;

	@ApiModelProperty("备注信息")
	private String remark;

	@ApiModelProperty("是否包含0未包含1包含")
	private Integer checked;

	@ApiModelProperty("子级列表")
	private List<PermissionVo> children;

	public PermissionVo(Long id, String permissionName, Long parentId, String pname, Integer sort, String rutePath, String component, Integer permissionType, Integer isShow,Integer isHomepage, String permissionKey, String icon, Long createUserid, LocalDateTime createTime, Long updateUserid, LocalDateTime updateTime, String remark, Integer checked, List<PermissionVo> children) {
		this.id = id;
		this.permissionName = permissionName;
		this.parentId = parentId;
		this.pname = pname;
		this.sort = sort;
		this.rutePath = rutePath;
		this.component = component;
		this.permissionType = permissionType;
		this.isShow = isShow;
		this.isHomepage = isHomepage;
		this.permissionKey = permissionKey;
		this.icon = icon;
		this.createUserid = createUserid;
		this.createTime = createTime;
		this.updateUserid = updateUserid;
		this.updateTime = updateTime;
		this.remark = remark;
		this.checked = checked;
		this.children = children;
	}


}

